package com.phil.tuangou.util;

import java.util.List;


import android.content.Context;
import android.location.Address;
import android.location.Criteria;
import android.location.Geocoder;
import android.location.Location;
import android.location.LocationManager;




public class Util {

//	public String getCurrentCity(Context context){
//		
//        LocationManager locationManager = (LocationManager)context.getSystemService(Context.LOCATION_SERVICE);
//        String provider = locationManager.getBestProvider(new Criteria(), true);
//        Geocoder mGeocoder = new Geocoder(context);
//        
//        if (provider != null) {
//            // Fire off geocoding request for last fix, but only if not
//            // restoring
//        	Location  mLastFix = locationManager.getLastKnownLocation(provider);
//          if(mLastFix != null)
//                startGeocode(mLastFix);
//          
//          List<Address> results = mGeocoder.getFromLocation(query.lat, query.lon, 1);
//          if (results.size() > 0) {
//              result = new GeocodeQuery(results.get(0));
//              result.lat = query.lat;
//              result.lon = query.lon;
//            
//        }
//		return null;
//	}
}
